{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import glob"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "results = {}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "c = pd.read_json('50q/testset-50q-eval-claude.jsonl', lines=True)\n",
    "f = pd.read_json(\"50q/testset-50q-eval-falcon3.jsonl\", lines=True)\n",
    "\n",
    "results['claude-50q'] = c[['faithfulness_correct','relevance_correct']].mean()\n",
    "results['falcon3-50q'] = f[['faithfulness_correct','relevance_correct']].mean()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "c = pd.read_json('100q/testset-100q-eval-claude.jsonl', lines=True)\n",
    "f = pd.read_json(\"100q/testset-100q-eval-falcon3.jsonl\", lines=True)\n",
    "\n",
    "results['claude-100q'] = c[['faithfulness_correct','relevance_correct']].mean()\n",
    "results['falcon3-100q'] = f[['faithfulness_correct','relevance_correct']].mean()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>claude-50q</th>\n",
       "      <th>falcon3-50q</th>\n",
       "      <th>claude-100q</th>\n",
       "      <th>falcon3-100q</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>faithfulness_correct</th>\n",
       "      <td>0.76</td>\n",
       "      <td>0.795918</td>\n",
       "      <td>0.773196</td>\n",
       "      <td>0.67</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>relevance_correct</th>\n",
       "      <td>0.79</td>\n",
       "      <td>0.816327</td>\n",
       "      <td>0.912371</td>\n",
       "      <td>0.78</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                      claude-50q  falcon3-50q  claude-100q  falcon3-100q\n",
       "faithfulness_correct        0.76     0.795918     0.773196          0.67\n",
       "relevance_correct           0.79     0.816327     0.912371          0.78"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r = pd.DataFrame(results)\n",
    "r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "base",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
